'Declaration for checking disk's free space. DLL which comes with VBINST.
'Turbo Pascal for Windows source code included.
Declare Function DFree Lib "vbinst.dll" (ByVal Disk As Integer) As Long
'API Declarations
Declare Function GetWindowsDirectory Lib "Kernel" (ByVal WD As String, ByVal nWSize As Integer) As Integer
Declare Function GetSystemDirectory Lib "Kernel" (ByVal WSD As String, ByVal nSSize As Integer) As Integer
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplication As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal FileStr As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplication As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
'misc const
Global Const TRUE = -1
Global Const FALSE = 0
Global Const IDYES = 6 'define msgbox return value
'Color const for vbinst
Global Const WINDOW_BACKGROUND = &H80000005 ' Window background.
Global Const APPLICATION_WORKSPACE = &H8000000C
Global Const WINDOW_TEXT = &H80000008 ' Text in windows.
'misc variables
Global SD As String 'source dir
Global WD As String 'windows dir (see form load procedure)
Global WSD As String 'windows system dir (see form load procedure)
Global WarnFlag As Integer 'flag to overwrite warning
'variables for checking diskspace
Global LoadDir As String 'form load default dest dir
Global DestDrive As String 'chosen drive to check free diskspace
'variables for reading private ini file (install.inf)
Global nSize As Integer
Global lpFileName As String
Global FileStr As String * 128 'must use fixed-lenght variable because DLL's return
'variables for FileCopy and IniCopy
Global source As String 'source file
Global Dest As String 'destination file
Global DestDir As String 'destination dir for program files